/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Utils;

/**
 *
 * @author familia
 */
public class Utilidades {
    private double proporcaoX = 30;//45;
    private double proporcaoY = 11.75;//20;
       

    public double conversaoMPixelX(double metro, int larguraTela){

        double pixels = (larguraTela*metro)/proporcaoX;
        return pixels;
    }
    
    public double conversaoMPixelY(double metro, int alturaTela){
        
        double pixels = (alturaTela/proporcaoY)*metro;
        return pixels;
    }

    public double conversaoPixelMX(int pixel, int larguraTela){

        double metro = pixel*proporcaoX/larguraTela;
        return metro;
    }

    public double conversaoPixelMY(int pixel, int larguraTela){

        double metro = pixel*proporcaoY/larguraTela;
        return metro;
    }



}
